﻿/*****************************************************************************/
/*****************************************************************************/
CREATE PROCEDURE [CaseManagement].[VisitsForCase]( @CaseOID BIGINT )
AS  
BEGIN

	Select  Visits.OID as 'VisitOID',
            Visits.Version as 'VisitVersion',
            Visits.CaseID,
            Visits.ArrivalDate as 'VisitArrivalDate',
            Visits.DischargeDate as 'VisitDischargeDate',
            Visits.FacilityID as 'VisitFacilityID',
            Visits.EstimatedLOS as 'VisitEstimatedLOS',
            Visits.FamilyPresent as 'VisitFamilyPresent',
            Visits.FamilyArrivalDate as 'VisitFamilyArrivalDate',
            Visits.FamilyDepartureDate as 'VisitFamilyDepartureDate',
            Visits.FamilyEstimatedLOS as 'VisitFamilyEstimatedLOS',
            Visits.MethodOfTravel as 'VisitMethodOfTravel',
            Visits.OriginOfTravel as 'VisitOriginOfTravel',
            Visits.InvitationalTravelOrders as 'VisitInvitationalTravelOrders',
            Visits.UpdatedDate as 'VisitUpdatedDate',
            Visits.CreatedDate as 'VisitCreatedDate'
	From Visits
	Where
		Visits.CaseID = @CaseOID

END


